<?php

namespace App\Base\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use App\Base\Exceptions\ApiException;
class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
    public function throwValidatorException($validator){

        throw  new ApiException(ApiException::ERROR_VALIDATION);
    }

    public function show_error($msg){
        return view("common.error")->with("msg",$msg);
    }
}
